#pragma once

#include "SpriteCanvas.h"
#include "UIControl.h"
#include "ximage.h"
// CAwardWnd

class CAwardWnd : public CWnd, public CSpriteCanvas, public CUIControl
{
	enum
	{

		Award_Left_Board = 25,
        Award_Right_Board = 25,
		AWard_Top_Border = 75,
	};
	DECLARE_DYNAMIC(CAwardWnd)

public:
	CAwardWnd();
	virtual ~CAwardWnd();

protected:
	DECLARE_MESSAGE_MAP()

	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnPaint();
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
public:
	virtual void RenderBackground(CDC *pDC);
	virtual void RenderForeground(CDC *pDC);
	virtual void RenderSprite(CDC *pDC);

	void TickUpdate();
	void RedrawRect(int nUpdateLayer,CRect rc);
	virtual void InvalidateUI();
	virtual void InvalidateUIRect(CRect rc);

	void RefreshDiploma();
public:
	CxImage m_imgBk;
	CxImage m_imgDiploma;
	CRect m_rcDiploma;
};

extern CAwardWnd *g_pAwardWnd;

